import java.util.*;
public class 邻接表 {
   static int[] h=new int[10],e=new int[20],ne=new int[20];
   static int idx;
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        int n=5;
        for(int i=0;i<10;i++){
            h[i]=-1;
        }
        int i;int j;
        while(n-->0){
            i=sc.nextInt();
            j=sc.nextInt();
            add(i,j);
        }
        System.out.println(" ");
        System.out.println(" ");
    }
    static void add(int a,int b){
        e[idx] =b;
        ne[idx] = h[a]; 
        h[a] = idx++ ;
    }
}
